#ifndef FILE_UTIL_H
#define FILE_UTIL_H
#include <string>
#include <vector>
#include <QPushButton>
#include "stdio.h"
class file_util
{
public:
    file_util();
    /* List all the 'note' in the '/notes' directory */
    static std::vector<std::string> listDirectory(std::string dir);
    static std::vector<std::string> decompose_file_name(std::string filename,char delimiter);
    static std::vector<std::string> split(const std::string &s, char delim);
    static std::vector<std::string> split(const std::string &s, char delim, std::vector<std::string> &elems);
    // copy file, return true if suceed, false if not
    static bool copyFile(char * src, char * des);
    static std::string getFileExtension(std::string fileName);

};

#endif // FILE_UTIL_H
